/**
 * Copyright(c) kyle.
 */
package org.example.tomcat.bio.basic;

import java.io.OutputStream;

/**
 * 响应
 *
 * @author kyle
 * @version 1.00.00
 * @since [2020-10-20 19:50]
 * @updateUser [Kyle]
 * @updateRemark [说明本次修改内容]
 * @date [2020-10-20 19:50]
 */
public class GPResponse {
    private OutputStream out;
    public GPResponse(OutputStream pOut){
        out=pOut;
    }
    public void write(String s)throws Exception{
        StringBuilder sb=new StringBuilder();
        sb.append("HTTP/1.1 200 OK\n")
                .append("Content-Type: text/html;/\n")
                .append("\r\n")
                .append(s);
        out.write(sb.toString().getBytes());
    }
}
